import { PageSchema } from './types.js'

// 原始数据源信息（用于参考）
export const dataSource = [
  {
    description: '会籍商品列表',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-18_044652/membershipGoodsMgmt.json',
  },
  {
    description: '核销商品列表',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-25_083028/qrcodeGoodsMgmt.json',
  },
  {
    description: '预约商品列表',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-23_084545/reserveGoodsMgmt.json',
  },
  {
    description: '权益商品列表',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-22_021950/equityGoodsMgmt.json',
  },
  {
    description: '权益商品',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-15_035551/equityGoods.json',
  },
  {
    description: '登录页设置',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-26_062625/loginSet.json',
  },
  {
    description: '测试页面',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-30_074341/test.json',
  },
  {
    description: '接口设置',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-25_034830/interfaceConfig.json',
  },
  {
    description: '酒店订单列表',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-26_021637/hotel.json',
  },
  {
    description: '核销订单详情',
    fileUrl:
      'https://oss-images.dragonpass.com.cn/business-saas/platform/2025-09-27_152019/detail.json',
  },
]

// 基于 dataSource fileUrl 生成的 Schema 数据
export const fileUrlSchemas: Record<string, PageSchema> = {
  会籍商品列表: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
      languagePackage: 'intl-web',
    },
    schema: {
      type: 'object',
      properties: {
        pjvnkbgs9q0: {
          type: 'void',
          'x-component': 'Dialog',
          'x-component-props': {
            dialogName: '操作日志',
            title: '操作日志',
            width: '800',
            maskStyle: {},
            bodyStyle: {},
            style: {},
            showFooter: false,
          },
          'x-designable-id': 'pjvnkbgs9q0',
          'x-index': 0,
          properties: {
            bwnr5srasl6: {
              type: 'void',
              'x-component': 'ProTable',
              'x-component-props': {
                columns: {
                  data: [
                    {
                      title: '操作项目',
                      dataIndex: 'operationItem',
                      ellipsis: true,
                      search: false,
                    },
                    {
                      title: '操作详情',
                      dataIndex: 'operationDetail',
                    },
                    {
                      title: '操作人',
                      dataIndex: 'operator',
                    },
                    {
                      title: '操作时间',
                      dataIndex: 'operationTime',
                    },
                  ],
                },
                action: {
                  buttons: {
                    data: [],
                  },
                },
                apiPath: 'api',
                rowKey: 'operationTime',
                toolBarRender: {
                  data: [],
                },
                rowSelection: {},
                pagination: {},
                request:
                  "{{async (ctx, deps) => {\r\n  const { request,getGlobalData } = deps\r\n  const id = getGlobalData('id')\r\n  const { params } = ctx\r\n  const res = request({\r\n    uri: '/api/tenant/global/operation/log/query',\r\n    params: {\r\n      ...params,\r\n      type: 'PRODUCT',\r\n      id: id\r\n    },\r\n    method: 'POST',\r\n  })\r\n  return res\r\n}}}",
                scroll: {
                  x: 700,
                },
              },
              'x-designable-id': 'bwnr5srasl6',
              'x-index': 0,
            },
          },
        },
        grxjvwdkfuf: {
          type: 'void',
          'x-component': 'Dialog',
          'x-component-props': {
            dialogName: '库存管理',
            title: '库存管理',
            width: '600',
            confirm:
              "{{async (ctx, deps) => {\r\n  const values = await ctx.form.submit()\r\n  const {availableStockNum, id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/updateStockNum',\r\n    params: {\r\n      id,\r\n      permissionType: 'equityGoods',\r\n      ...values.stock\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('修改成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
            maskStyle: {},
            bodyStyle: {},
            style: {},
            okButtonProps: {},
            cancelButtonProps: {},
          },
          'x-designable-id': 'grxjvwdkfuf',
          'x-index': 1,
          properties: {
            stock: {
              type: 'object',
              'x-component': 'Form',
              labelCol: 6,
              wrapperCol: 12,
              'x-validator': [],
              'x-component-props': {},
              'x-designable-id': '3rzw7a4h4i3',
              'x-index': 0,
              name: 'stock',
              title: '修改库存表单',
              properties: {
                stockOperationType: {
                  title: '库存',
                  'x-decorator': 'FormItem',
                  'x-component': 'Select',
                  'x-validator': [],
                  'x-component-props': {},
                  'x-decorator-props': {
                    colon: true,
                  },
                  required: true,
                  enum: [
                    {
                      children: [],
                      label: '增加',
                      value: 'add',
                    },
                    {
                      children: [],
                      label: '减少',
                      value: 'sub',
                    },
                  ],
                  name: 'stockOperationType',
                  'x-designable-id': 'kz1s5qhzz7f',
                  'x-index': 0,
                  default: 'add',
                },
                number: {
                  type: 'number',
                  title: '数量',
                  'x-decorator': 'FormItem',
                  'x-component': 'NumberPicker',
                  'x-validator': [],
                  'x-component-props': {
                    decimalSeparator: '',
                    min: 1,
                  },
                  'x-decorator-props': {},
                  name: 'number',
                  required: true,
                  'x-designable-id': 'frgeytqtpdc',
                  'x-index': 1,
                  message: '请输入',
                },
              },
            },
          },
        },
        '6vpyps1qlsm': {
          type: 'void',
          'x-component': 'ProTable',
          'x-component-props': {
            columns: {
              data: [
                {
                  title: '商品编号',
                  dataIndex: 'proCode',
                  ellipsis: true,
                  search: true,
                  fixed: '',
                  width: 150,
                },
                {
                  title: '商品名称',
                  dataIndex: 'proName',
                  ellipsis: true,
                  search: true,
                },
                {
                  title: '会籍模板名称',
                  dataIndex: 'relationName',
                  search: true,
                  initialValue: {
                    title: '会籍模板名称',
                    dataIndex: 'relationName',
                    search: true,
                  },
                  width: 200,
                },
                {
                  title: '可售库存',
                  dataIndex: 'availableStockNum',
                  ellipsis: true,
                  search: false,
                  isRender: true,
                  render:
                    "{{(ctx) => {\r\n  const { stockLimit, availableStockNum } = ctx.record\r\n  return stockLimit ? availableStockNum: ctx.$t('不限制')\r\n}}}",
                  width: 120,
                },
                {
                  title: '兑换价（起）',
                  dataIndex: 'exchangePrice',
                  isRender: true,
                  render:
                    '{{(ctx) => {\r\n  const { currency, exchangePrice } = ctx.record\r\n  return `${exchangePrice} ${currency}`\r\n}}}',
                  initialValue: {
                    title: '兑换价（起）',
                    dataIndex: 'exchangePrice',
                    isRender: true,
                    render:
                      '{{async (ctx) => {\r\n  const { currency, exchangePrice } = ctx.record\r\n  return `${exchangePrice} ${currency}`\r\n}}}',
                  },
                  width: 150,
                },
                {
                  title: '更新时间',
                  dataIndex: 'updateTime',
                  ellipsis: true,
                  search: true,
                  isRenderFormItem: true,
                  initialValue: {
                    title: '更新时间',
                    dataIndex: 'updateTime',
                    ellipsis: true,
                    search: true,
                    rangCacheName: 'updateTime',
                    rangSstartName: 'updateTimeStart',
                    rangEndName: 'updateTimeEnd',
                    isRenderFormItem: true,
                    renderFormItem: 'rangePicker',
                    initialValue: {
                      title: '更新时间',
                      dataIndex: 'updateTime',
                      ellipsis: true,
                      search: true,
                      rangCacheName: 'updateTime',
                      rangSstartName: 'updateTimeStart',
                      rangEndName: 'updateTimeEnd',
                      isRenderFormItem: true,
                      renderFormItem: 'rangePicker',
                    },
                    tooltip: '',
                    rangStartName: 'updateTimeStart',
                  },
                  rangCacheName: 'updateTime',
                  rangSstartName: 'updateTimeStart',
                  tooltip: '',
                  renderFormItem: 'rangePicker',
                  rangStartName: 'updateTimeStart',
                  rangEndName: 'updateTimeEnd',
                  width: 160,
                },
                {
                  title: '状态',
                  dataIndex: 'proStatusName',
                  ellipsis: true,
                  search: false,
                  isRenderFormItem: true,
                  renderFormItem: 'select',
                  isRender: false,
                  initialValue: {
                    title: '状态',
                    dataIndex: 'proStatusName',
                    ellipsis: true,
                    search: false,
                    isRenderFormItem: true,
                    renderFormItem: 'select',
                    isRender: false,
                    selectRequest: 'equityGoodsStatusAsync',
                    initialValue: {
                      title: '状态',
                      dataIndex: 'proStatus',
                      ellipsis: true,
                      search: true,
                      isRenderFormItem: true,
                      renderFormItem: 'select',
                      isRender: false,
                      selectRequest: 'equityGoodsStatusAsync',
                    },
                    fixed: 'right',
                    width: 80,
                    rangStartName: 'proStatusNameStart',
                    rangEndName: 'proStatusNameEnd',
                    tag: true,
                  },
                  fixed: 'right',
                  width: 100,
                  rangStartName: 'proStatusNameStart',
                  rangEndName: 'proStatusNameEnd',
                  selectRequest: 'equityGoodsStatusAsync',
                  tag: true,
                },
                {
                  title: '状态',
                  dataIndex: 'proStatus',
                  hideInTable: true,
                  search: false,
                  rangStartName: 'proStatusStart',
                  rangEndName: 'proStatusEnd',
                  renderFormItem: 'select',
                  selectRequest: 'equityGoodsStatusAsync',
                  initialValue: {
                    title: '状态',
                    dataIndex: 'proStatus',
                    hideInTable: true,
                    search: true,
                    rangStartName: 'proStatusStart',
                    rangEndName: 'proStatusEnd',
                    renderFormItem: 'select',
                    selectRequest: 'equityGoodsStatusAsync',
                  },
                  width: null,
                },
                {
                  title: '客户',
                  dataIndex: 'customerName',
                  initialValue: {
                    title: '客户',
                    dataIndex: 'customerName',
                    initialValue: {
                      title: '客户',
                      dataIndex: 'customerName',
                    },
                  },
                  width: 180,
                },
                {
                  title: '客户协议',
                  dataIndex: 'agreementName',
                  initialValue: {
                    title: '客户协议',
                    dataIndex: 'agreementName',
                    initialValue: {
                      title: '客户协议',
                      dataIndex: 'agreementName',
                      initialValue: {
                        title: '客户协议',
                        dataIndex: 'agreementName',
                      },
                    },
                  },
                  width: 180,
                },
              ],
            },
            action: {
              buttons: {
                data: [
                  {
                    text: '编辑',
                    type: 'primary',
                    disabled: '',
                    customExpression:
                      '{{(ctx, deps) => {\r\n  const id = ctx.record.id\r\n  deps.goTo(`/commodity/membershipGoodsMgmt/handle/edit?id=${id}`)\r\n}}}',
                    visible: '',
                    accessKey: 'goods:mgmt:msGoods:edit',
                  },
                  {
                    text: '上架',
                    visible:
                      '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 4 || proStatus === 1\r\n}}}',
                    usePopconfirm: true,
                    popconfirmTitle: '确定上架该商品吗？',
                    customExpression:
                      "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      permissionType: 'msGoods',\r\n      proStatus: 2\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('上架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                    accessKey: 'goods:mgmt:msGoods:sellStatus',
                  },
                  {
                    text: '下架',
                    visible:
                      '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 2\r\n}}}',
                    customExpression:
                      "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      permissionType: 'msGoods',\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                    usePopconfirm: true,
                    popconfirmTitle: '确定下架该商品吗？',
                    accessKey: 'goods:mgmt:msGoods:sellStatus',
                  },
                  {
                    text: '操作日志',
                    initialValue: {
                      text: '下架',
                      visible:
                        '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 2\r\n}}}',
                      customExpression:
                        "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      permissionType: 'equityGoods',\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                      usePopconfirm: true,
                      popconfirmTitle: '确定下架该商品吗？',
                    },
                    dialog: '操作日志',
                    customExpression:
                      "{{(ctx, deps) => {\r\n  const setGlobalData = deps.setGlobalData\r\n  const id = ctx.record.id\r\n  setGlobalData('id', id)\r\n}}}",
                    accessKey: 'goods:mgmt:msGoods:list:operation',
                  },
                  {
                    text: '修改库存',
                    dialog: '库存管理',
                    disabled:
                      '{{(record, deps) => {\r\n  return record &&!record.stockLimit\r\n}}}',
                  },
                ],
              },
              width: 250,
              fixed: 'right',
              showLen: 4,
            },
            apiPath: 'api',
            rowKey: 'proCode',
            request:
              "{{async (ctx, deps) => {\r\n  const { request } = deps\r\n  const { params } = ctx\r\n  const res = await request({\r\n    uri: '/api/tenant/ms/product/page',\r\n    params: {\r\n      ...params,\r\n      proStatus: params.tabActiveKey,\r\n      sortRule: 'updateTime'\r\n    },\r\n    method: 'POST',\r\n  })\r\n  const tagColors = {\r\n    2: 'success',\r\n    3: 'warning',\r\n    1: 'processing',\r\n    4: 'error'\r\n  }\r\n  res.records = res.records.map((item) => {\r\n    return {\r\n      ...item,\r\n      tagColor: tagColors[item.proStatus]\r\n    }\r\n  })\r\n  return res\r\n}}}",
            toolBarRender: {
              data: [
                {
                  text: '新建',
                  size: 'middle',
                  buttonType: 'primary',
                  icon: 'PlusOutlined',
                  customExpression:
                    '{{(ctx, deps) => {\r\n  deps.goTo(`/commodity/membershipGoodsMgmt/handle/add`)\r\n}}}',
                  accessKey: 'goods:mgmt:msGoods:add',
                },
                {
                  text: '批量上架',
                  disabled: '',
                  customExpression:
                    "{{async (ctx, deps) => {\r\n  const ids = ctx.selectedRows.map(item => item.id)\r\n  if (ids.length === 0) {\r\n    deps.antdMsg(ctx.$t('请选择商品'), 'warning')\r\n    return\r\n  }\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids,\r\n      permissionType: 'msGoods',\r\n      proStatus: 2\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('上架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                  accessKey: 'goods:mgmt:msGoods:sellStatus',
                },
                {
                  text: '批量下架',
                  customExpression:
                    "{{async (ctx, deps) => {\r\n  const ids = ctx.selectedRows.map(item => item.id)\r\n  if (ids.length === 0) {\r\n    deps.antdMsg(ctx.$t('请选择商品'), 'warning')\r\n    return\r\n  }\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids,\r\n      permissionType: 'msGoods',\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                  accessKey: 'goods:mgmt:msGoods:sellStatus',
                },
              ],
            },
            rowSelection: {
              enabled: true,
            },
            pagination: {},
            scroll: {
              x: 1800,
            },
            tabs: '{{async (ctx, deps) => {\r\n  const dataSources = deps.dataSources\r\n  return dataSources.goodsStatusAsync(ctx.$t)\r\n}}}',
          },
          'x-designable-id': '6vpyps1qlsm',
          'x-index': 2,
        },
      },
      'x-designable-id': '4el5zzy8i3v',
    },
  },
  核销商品列表: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
      languagePackage: '',
    },
    schema: {
      type: 'object',
      properties: {
        '1s4gr0mhxng': {
          type: 'void',
          'x-component': 'Dialog',
          'x-component-props': {
            dialogName: '库存管理',
            title: '库存管理',
            width: '600',
            confirm:
              "{{async (ctx, deps) => {\r\n  const values = await ctx.form.submit()\r\n  const {availableStockNum, id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/updateStockNum',\r\n    params: {\r\n      id,\r\n      permissionType: 'equityGoods',\r\n      ...values.stock\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('修改成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
            maskStyle: {},
            bodyStyle: {},
            style: {},
            okButtonProps: {},
            cancelButtonProps: {},
          },
          'x-designable-id': '1s4gr0mhxng',
          'x-index': 0,
          properties: {
            stock: {
              type: 'object',
              'x-component': 'Form',
              labelCol: 6,
              wrapperCol: 12,
              'x-validator': [],
              'x-component-props': {},
              'x-designable-id': '4p0ibopgyv2',
              'x-index': 0,
              name: 'stock',
              title: '修改库存表单',
              properties: {
                stockOperationType: {
                  title: '库存',
                  'x-decorator': 'FormItem',
                  'x-component': 'Select',
                  'x-validator': [],
                  'x-component-props': {},
                  'x-decorator-props': {
                    colon: true,
                  },
                  required: true,
                  enum: [
                    {
                      children: [],
                      label: '增加',
                      value: 'add',
                    },
                    {
                      children: [],
                      label: '减少',
                      value: 'sub',
                    },
                  ],
                  name: 'stockOperationType',
                  'x-designable-id': 's99c4ocfw8c',
                  'x-index': 0,
                  default: 'add',
                },
                number: {
                  type: 'number',
                  title: '数量',
                  'x-decorator': 'FormItem',
                  'x-component': 'NumberPicker',
                  'x-validator': [],
                  'x-component-props': {
                    decimalSeparator: '',
                    min: 1,
                  },
                  'x-decorator-props': {},
                  name: 'number',
                  required: true,
                  'x-designable-id': 'yi4hu3dds1l',
                  'x-index': 1,
                  message: '请输入',
                },
              },
            },
          },
        },
        '5gzg947shtf': {
          type: 'void',
          'x-component': 'Dialog',
          'x-component-props': {
            dialogName: '操作日志',
            title: '操作日志',
            width: '800',
            maskStyle: {},
            bodyStyle: {},
            style: {},
            showFooter: false,
          },
          'x-designable-id': '5gzg947shtf',
          'x-index': 1,
          properties: {
            rqlll43ijy3: {
              type: 'void',
              'x-component': 'ProTable',
              'x-component-props': {
                columns: {
                  data: [
                    {
                      title: '操作项目',
                      dataIndex: 'operationItem',
                      ellipsis: true,
                      search: false,
                    },
                    {
                      title: '操作详情',
                      dataIndex: 'operationDetail',
                    },
                    {
                      title: '操作人',
                      dataIndex: 'operator',
                    },
                    {
                      title: '操作时间',
                      dataIndex: 'operationTime',
                    },
                  ],
                },
                action: {
                  buttons: {
                    data: [],
                  },
                },
                apiPath: 'api',
                rowKey: 'operationTime',
                toolBarRender: {
                  data: [],
                },
                rowSelection: {},
                pagination: {},
                request:
                  "{{async (ctx, deps) => {\r\n  const { request,getGlobalData } = deps\r\n  const id = getGlobalData('id')\r\n  const { params } = ctx\r\n  const res = request({\r\n    uri: '/api/tenant/global/operation/log/query',\r\n    params: {\r\n      ...params,\r\n      type: 'PRODUCT',\r\n      id: id\r\n    },\r\n    method: 'POST',\r\n  })\r\n  return res\r\n}}}",
                scroll: {
                  x: 700,
                },
              },
              'x-designable-id': 'rqlll43ijy3',
              'x-index': 0,
            },
          },
        },
        hwmqwc4yzjp: {
          type: 'void',
          'x-component': 'ProTable',
          'x-component-props': {
            columns: {
              data: [
                {
                  title: '商品编号',
                  dataIndex: 'proCode',
                  ellipsis: true,
                  search: true,
                  fixed: '',
                  width: 150,
                },
                {
                  title: '商品名称',
                  dataIndex: 'proName',
                  ellipsis: true,
                  search: true,
                },
                {
                  title: '品类类型',
                  dataIndex: 'categoryTypeName',
                  search: true,
                  rangStartName: 'categoryTypeNameStart',
                  rangEndName: 'categoryTypeNameEnd',
                  renderFormItem: 'categoryPicker',
                  width: 180,
                  ellipsis: true,
                },
                {
                  title: '销售库存',
                  dataIndex: 'availableStockNum',
                  ellipsis: true,
                  search: false,
                  isRender: true,
                  render:
                    "{{(ctx) => {\r\n  const { stockLimit, availableStockNum } = ctx.record\r\n  return stockLimit ? availableStockNum: ctx.$t('不限制')\r\n}}}",
                  width: 120,
                },
                {
                  title: '兑换类型',
                  dataIndex: 'exchangeType',
                  isRender: false,
                  renderFormItem: 'select',
                  rangCacheName: 'exchangeType',
                  rangSstartName: 'exchangeTypeStart',
                  selectRequest: 'Other_ExchangeTypeList',
                  search: true,
                  isRenderFormItem: true,
                  initialValue: {
                    title: '兑换类型',
                    dataIndex: 'exchangeType',
                    isRender: false,
                    renderFormItem: 'select',
                    rangCacheName: 'exchangeType',
                    rangSstartName: 'exchangeTypeStart',
                    rangEndName: 'exchangeTypeEnd',
                    selectRequest: 'EQ_ExchangeTypeList',
                    search: true,
                    isRenderFormItem: true,
                  },
                  width: 130,
                },
                {
                  title: '更新时间',
                  dataIndex: 'updateTime',
                  ellipsis: true,
                  search: true,
                  isRenderFormItem: true,
                  initialValue: {
                    title: '更新时间',
                    dataIndex: 'updateTime',
                    ellipsis: true,
                    search: true,
                    rangCacheName: 'updateTime',
                    rangSstartName: 'updateTimeStart',
                    rangEndName: 'updateTimeEnd',
                    isRenderFormItem: true,
                    renderFormItem: 'rangePicker',
                  },
                  rangCacheName: 'updateTime',
                  rangSstartName: 'updateTimeStart',
                  tooltip: '',
                  renderFormItem: 'rangePicker',
                  rangStartName: 'updateTimeStart',
                  rangEndName: 'updateTimeEnd',
                  width: 170,
                },
                {
                  title: '状态',
                  dataIndex: 'proStatusName',
                  ellipsis: true,
                  search: false,
                  isRenderFormItem: true,
                  renderFormItem: 'select',
                  isRender: false,
                  initialValue: {
                    title: '状态',
                    dataIndex: 'proStatus',
                    ellipsis: true,
                    search: true,
                    isRenderFormItem: true,
                    renderFormItem: 'select',
                    isRender: false,
                    selectRequest: 'equityGoodsStatusAsync',
                  },
                  fixed: 'right',
                  width: 110,
                  rangStartName: 'proStatusNameStart',
                  rangEndName: 'proStatusNameEnd',
                  selectRequest: 'equityGoodsStatusAsync',
                  tag: true,
                },
                {
                  title: '状态',
                  dataIndex: 'proStatus',
                  hideInTable: true,
                  search: true,
                  rangStartName: 'proStatusStart',
                  rangEndName: 'proStatusEnd',
                  renderFormItem: 'select',
                  selectRequest: 'equityGoodsStatusAsync',
                },
                {
                  title: '客户',
                  dataIndex: 'customerName',
                  initialValue: {
                    title: '客户',
                    dataIndex: 'customerName',
                  },
                  width: 180,
                },
                {
                  title: '客户协议',
                  dataIndex: 'agreementName',
                  initialValue: {
                    title: '客户协议',
                    dataIndex: 'agreementName',
                    initialValue: {
                      title: '客户协议',
                      dataIndex: 'agreementName',
                    },
                  },
                  width: 180,
                },
              ],
            },
            action: {
              buttons: {
                data: [
                  {
                    text: '编辑',
                    type: 'primary',
                    disabled: '',
                    customExpression:
                      '{{(ctx, deps) => {\r\n  const id = ctx.record.id\r\n  deps.goTo(`/lowcodePreview/qrcodeGoodsMgmt/handle/edit?id=${id}`)\r\n}}}',
                    visible: '',
                    accessKey: 'goods:mgmt:qrcodeGoods:edit',
                  },
                  {
                    text: '查看网点',
                    customExpression:
                      '{{(ctx, deps) => {\r\n  const record = ctx.record\r\n  const { proCode, projectId, categoryType } = record\r\n  console.log(record, 888)\r\n  deps.goTo(`/commodity/networkMgmt/qrcodeGoods?proCode=${proCode}&projectId=${projectId}&categoryType=${categoryType}`)\r\n}}}',
                    accessKey: 'goods:mgmt:qrcodeGoods:network',
                  },
                  {
                    text: '上架',
                    visible:
                      '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 4 || proStatus === 1\r\n}}}',
                    usePopconfirm: true,
                    popconfirmTitle: '确定上架该商品吗？',
                    customExpression:
                      "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      proStatus: 2\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('上架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                    accessKey: 'goods:mgmt:qrcodeGoods:sellStatus',
                  },
                  {
                    text: '下架',
                    visible:
                      '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 2\r\n}}}',
                    customExpression:
                      "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                    usePopconfirm: true,
                    popconfirmTitle: '确定下架该商品吗？',
                    accessKey: 'goods:mgmt:qrcodeGoods:sellStatus',
                  },
                  {
                    text: '操作日志',
                    initialValue: {
                      text: '下架',
                      visible:
                        '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 2\r\n}}}',
                      customExpression:
                        "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      permissionType: 'equityGoods',\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                      usePopconfirm: true,
                      popconfirmTitle: '确定下架该商品吗？',
                    },
                    dialog: '操作日志',
                    customExpression:
                      "{{(ctx, deps) => {\r\n  const setGlobalData = deps.setGlobalData\r\n  const id = ctx.record.id\r\n  setGlobalData('id', id)\r\n}}}",
                    accessKey: 'goods:mgmt:qrcodeGoods:operation',
                  },
                  {
                    text: '修改库存',
                    dialog: '库存管理',
                    disabled:
                      '{{(record, deps) => {\r\n  return record &&!record.stockLimit\r\n}}}',
                  },
                ],
              },
              width: 200,
              fixed: 'right',
              showLen: 4,
            },
            apiPath: 'api',
            rowKey: 'proCode',
            request:
              "{{async (ctx, deps) => {\r\n  const { request } = deps\r\n  const { params } = ctx\r\n  const res = await request({\r\n    uri: '/api/tenant/qr/v2/product/page',\r\n    params: {\r\n      ...params,\r\n      proStatus: params.tabActiveKey,\r\n      sortRule: 'updateTime'\r\n    },\r\n    method: 'POST',\r\n  })\r\n  const tagColors = {\r\n    2: 'success',\r\n    3: 'warning',\r\n    1: 'processing',\r\n    4: 'error'\r\n  }\r\n  res.records = res.records.map((item) => {\r\n    return {\r\n      ...item,\r\n      tagColor: tagColors[item.proStatus]\r\n    }\r\n  })\r\n  return res\r\n}}}",
            toolBarRender: {
              data: [
                {
                  text: '新建',
                  size: 'middle',
                  buttonType: 'primary',
                  icon: 'PlusOutlined',
                  customExpression:
                    '{{(ctx, deps) => {\r\n  deps.goTo(`/lowcodePreview/qrcodeGoodsMgmt/handle/add`)\r\n}}}',
                  accessKey: 'goods:mgmt:qrcodeGoods:add',
                },
                {
                  text: '批量上架',
                  disabled: '',
                  customExpression:
                    "{{async (ctx, deps) => {\r\n  const ids = ctx.selectedRows.map(item => item.id)\r\n  if (ids.length === 0) {\r\n    deps.antdMsg(ctx.$t('请选择商品'), 'warning')\r\n    return\r\n  }\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids,\r\n      proStatus: 2\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('上架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                  accessKey: 'goods:mgmt:qrcodeGoods:sellStatus',
                },
                {
                  text: '批量下架',
                  customExpression:
                    "{{async (ctx, deps) => {\r\n  const ids = ctx.selectedRows.map(item => item.id)\r\n  if (ids.length === 0) {\r\n    deps.antdMsg(ctx.$t('请选择商品'), 'warning')\r\n    return\r\n  }\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids,\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                  accessKey: 'goods:mgmt:qrcodeGoods:sellStatus',
                },
              ],
            },
            rowSelection: {
              enabled: true,
            },
            pagination: {},
            scroll: {
              x: 1700,
            },
            tabs: '{{async (ctx, deps) => {\r\n  const dataSources = deps.dataSources\r\n  const $t = ctx.$t\r\n  return dataSources.goodsStatusAsync($t)\r\n}}}',
          },
          'x-designable-id': 'hwmqwc4yzjp',
          'x-index': 2,
        },
      },
      'x-designable-id': 'e6ktveeu8r4',
    },
  },
  预约商品列表: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
      languagePackage: '$t-web',
    },
    schema: {
      type: 'object',
      properties: {
        '1mkrstr1h7r': {
          type: 'void',
          'x-component': 'Dialog',
          'x-component-props': {
            dialogName: '操作日志',
            title: '操作日志',
            width: '800',
            maskStyle: {},
            bodyStyle: {},
            style: {},
            showFooter: false,
          },
          'x-designable-id': '1mkrstr1h7r',
          'x-index': 0,
          properties: {
            jr2xbvfgtpu: {
              type: 'void',
              'x-component': 'ProTable',
              'x-component-props': {
                columns: {
                  data: [
                    {
                      title: '操作项目',
                      dataIndex: 'operationItem',
                      ellipsis: true,
                      search: false,
                    },
                    {
                      title: '操作详情',
                      dataIndex: 'operationDetail',
                    },
                    {
                      title: '操作人',
                      dataIndex: 'operator',
                    },
                    {
                      title: '操作时间',
                      dataIndex: 'operationTime',
                    },
                  ],
                },
                action: {
                  buttons: {
                    data: [],
                  },
                },
                apiPath: 'api',
                rowKey: 'operationTime',
                toolBarRender: {
                  data: [],
                },
                rowSelection: {},
                pagination: {},
                request:
                  "{{async (ctx, deps) => {\r\n  const { request,getGlobalData } = deps\r\n  const id = getGlobalData('id')\r\n  const { params } = ctx\r\n  const res = request({\r\n    uri: '/api/tenant/global/operation/log/query',\r\n    params: {\r\n      ...params,\r\n      type: 'PRODUCT',\r\n      id: id\r\n    },\r\n    method: 'POST',\r\n  })\r\n  return res\r\n}}}",
                scroll: {
                  x: 700,
                },
              },
              'x-designable-id': 'jr2xbvfgtpu',
              'x-index': 0,
            },
          },
        },
        '525w4lgm750': {
          type: 'void',
          'x-component': 'Dialog',
          'x-component-props': {
            dialogName: '库存管理',
            title: '库存管理',
            width: '600',
            confirm:
              "{{async (ctx, deps) => {\r\n  const values = await ctx.form.submit()\r\n  const {availableStockNum, id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/updateStockNum',\r\n    params: {\r\n      id,\r\n      permissionType: 'equityGoods',\r\n      ...values.stock\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('修改成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
            maskStyle: {},
            bodyStyle: {},
            style: {},
            okButtonProps: {},
            cancelButtonProps: {},
          },
          'x-designable-id': '525w4lgm750',
          'x-index': 1,
          properties: {
            stock: {
              type: 'object',
              'x-component': 'Form',
              labelCol: 6,
              wrapperCol: 12,
              'x-validator': [],
              'x-component-props': {},
              'x-designable-id': 'jex5lmi1959',
              'x-index': 0,
              name: 'stock',
              title: '修改库存表单',
              properties: {
                stockOperationType: {
                  title: '库存',
                  'x-decorator': 'FormItem',
                  'x-component': 'Select',
                  'x-validator': [],
                  'x-component-props': {},
                  'x-decorator-props': {
                    colon: true,
                  },
                  required: true,
                  enum: [
                    {
                      children: [],
                      label: '增加',
                      value: 'add',
                    },
                    {
                      children: [],
                      label: '减少',
                      value: 'sub',
                    },
                  ],
                  name: 'stockOperationType',
                  'x-designable-id': 'on39dgas1m2',
                  'x-index': 0,
                  default: 'add',
                },
                number: {
                  type: 'number',
                  title: '数量',
                  'x-decorator': 'FormItem',
                  'x-component': 'NumberPicker',
                  'x-validator': [],
                  'x-component-props': {
                    decimalSeparator: '',
                    min: 1,
                  },
                  'x-decorator-props': {},
                  name: 'number',
                  required: true,
                  'x-designable-id': 'bvu2h8hjat8',
                  'x-index': 1,
                  message: '请输入',
                },
              },
            },
          },
        },
        zphvu2to7gd: {
          type: 'void',
          'x-component': 'ProTable',
          'x-component-props': {
            columns: {
              data: [
                {
                  title: '商品编号',
                  dataIndex: 'proCode',
                  ellipsis: true,
                  search: true,
                  fixed: '',
                  width: 150,
                },
                {
                  title: '商品名称',
                  dataIndex: 'proName',
                  ellipsis: true,
                  search: true,
                  width: 250,
                },
                {
                  title: '品类类型',
                  dataIndex: 'categoryTypeName',
                  search: false,
                  rangStartName: 'categoryTypeNameStart',
                  rangEndName: 'categoryTypeNameEnd',
                  renderFormItem: 'categoryPicker',
                  width: 180,
                },
                {
                  title: '品类项目名称',
                  dataIndex: 'categoryProjectName',
                  search: true,
                  width: 160,
                },
                {
                  title: '销售库存',
                  dataIndex: 'availableStockNum',
                  ellipsis: true,
                  search: false,
                  isRender: true,
                  render:
                    "{{(ctx) => {\r\n  const { stockLimit, availableStockNum } = ctx.record\r\n  return stockLimit ? availableStockNum: ctx.$t('不限制')\r\n}}}",
                  width: 130,
                },
                {
                  title: '兑换类型',
                  dataIndex: 'exchangeType',
                  isRender: false,
                  renderFormItem: 'select',
                  rangCacheName: 'exchangeType',
                  rangSstartName: 'exchangeTypeStart',
                  selectRequest: 'Other_ExchangeTypeList',
                  search: true,
                  isRenderFormItem: true,
                  initialValue: {
                    title: '兑换类型',
                    dataIndex: 'exchangeType',
                    isRender: false,
                    renderFormItem: 'select',
                    rangCacheName: 'exchangeType',
                    rangSstartName: 'exchangeTypeStart',
                    rangEndName: 'exchangeTypeEnd',
                    selectRequest: 'EQ_ExchangeTypeList',
                    search: true,
                    isRenderFormItem: true,
                    initialValue: {
                      title: '兑换类型',
                      dataIndex: 'exchangeType',
                      isRender: false,
                      renderFormItem: 'select',
                      rangCacheName: 'exchangeType',
                      rangSstartName: 'exchangeTypeStart',
                      rangEndName: 'exchangeTypeEnd',
                      selectRequest: 'EQ_ExchangeTypeList',
                      search: true,
                      isRenderFormItem: true,
                    },
                  },
                  rangStartName: 'exchangeTypeStart',
                  rangEndName: 'exchangeTypeEnd',
                  width: 120,
                },
                {
                  title: '更新时间',
                  dataIndex: 'updateTime',
                  ellipsis: true,
                  search: true,
                  isRenderFormItem: true,
                  initialValue: {
                    title: '更新时间',
                    dataIndex: 'updateTime',
                    ellipsis: true,
                    search: true,
                    rangCacheName: 'updateTime',
                    rangSstartName: 'updateTimeStart',
                    rangEndName: 'updateTimeEnd',
                    isRenderFormItem: true,
                    renderFormItem: 'rangePicker',
                    initialValue: {
                      title: '更新时间',
                      dataIndex: 'updateTime',
                      ellipsis: true,
                      search: true,
                      rangCacheName: 'updateTime',
                      rangSstartName: 'updateTimeStart',
                      rangEndName: 'updateTimeEnd',
                      isRenderFormItem: true,
                      renderFormItem: 'rangePicker',
                    },
                    tooltip: '',
                    rangStartName: 'updateTimeStart',
                  },
                  rangCacheName: 'updateTime',
                  rangSstartName: 'updateTimeStart',
                  tooltip: '',
                  renderFormItem: 'rangePicker',
                  rangStartName: 'updateTimeStart',
                  rangEndName: 'updateTimeEnd',
                  width: 180,
                },
                {
                  title: '状态',
                  dataIndex: 'proStatusName',
                  ellipsis: true,
                  search: false,
                  isRenderFormItem: true,
                  renderFormItem: 'select',
                  isRender: false,
                  initialValue: {
                    title: '状态',
                    dataIndex: 'proStatusName',
                    ellipsis: true,
                    search: false,
                    isRenderFormItem: true,
                    renderFormItem: 'select',
                    isRender: false,
                    selectRequest: 'equityGoodsStatusAsync',
                    initialValue: {
                      title: '状态',
                      dataIndex: 'proStatus',
                      ellipsis: true,
                      search: true,
                      isRenderFormItem: true,
                      renderFormItem: 'select',
                      isRender: false,
                      selectRequest: 'equityGoodsStatusAsync',
                    },
                    fixed: 'right',
                    width: 80,
                    rangStartName: 'proStatusNameStart',
                    rangEndName: 'proStatusNameEnd',
                    tag: true,
                  },
                  fixed: 'right',
                  width: 80,
                  rangStartName: 'proStatusNameStart',
                  rangEndName: 'proStatusNameEnd',
                  selectRequest: 'equityGoodsStatusAsync',
                  tag: true,
                },
                {
                  title: '状态',
                  dataIndex: 'proStatus',
                  hideInTable: true,
                  search: false,
                  rangStartName: 'proStatusStart',
                  rangEndName: 'proStatusEnd',
                  renderFormItem: 'select',
                  selectRequest: 'equityGoodsStatusAsync',
                  initialValue: {
                    title: '状态',
                    dataIndex: 'proStatus',
                    hideInTable: true,
                    search: true,
                    rangStartName: 'proStatusStart',
                    rangEndName: 'proStatusEnd',
                    renderFormItem: 'select',
                    selectRequest: 'equityGoodsStatusAsync',
                  },
                },
                {
                  title: '客户',
                  dataIndex: 'customerName',
                  initialValue: {
                    title: '客户',
                    dataIndex: 'customerName',
                    initialValue: {
                      title: '客户',
                      dataIndex: 'customerName',
                    },
                  },
                  width: 180,
                },
                {
                  title: '客户协议',
                  dataIndex: 'agreementName',
                  initialValue: {
                    title: '客户协议',
                    dataIndex: 'agreementName',
                    initialValue: {
                      title: '客户协议',
                      dataIndex: 'agreementName',
                      initialValue: {
                        title: '客户协议',
                        dataIndex: 'agreementName',
                      },
                    },
                  },
                  width: 180,
                },
              ],
            },
            action: {
              buttons: {
                data: [
                  {
                    text: '编辑',
                    type: 'primary',
                    disabled: '',
                    customExpression:
                      '{{(ctx, deps) => {\r\n  const id = ctx.record.id\r\n  deps.goTo(`/lowcodePreview/reserveGoodsMgmt/handle/edit?id=${id}`)\r\n}}}',
                    visible: '',
                    accessKey: 'goods:mgmt:reserveGoods:edit',
                  },
                  {
                    text: '查看网点',
                    customExpression:
                      '{{(ctx, deps) => {\r\n  const record = ctx.record\r\n  const { proCode, projectId, categoryType } = record\r\n  deps.goTo( `/commodity/networkMgmt/reserveGoods?proCode=${proCode}&projectId=${projectId}&categoryType=${categoryType}`)\r\n}}}',
                    accessKey: 'goods:mgmt:reserveGoods:network',
                  },
                  {
                    text: '上架',
                    visible:
                      '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 4 || proStatus === 1\r\n}}}',
                    usePopconfirm: true,
                    popconfirmTitle: '确定上架该商品吗？',
                    customExpression:
                      "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      proStatus: 2\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('上架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                    accessKey: 'goods:mgmt:reserveGoods:sellStatus',
                  },
                  {
                    text: '下架',
                    visible:
                      '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 2\r\n}}}',
                    customExpression:
                      "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                    usePopconfirm: true,
                    popconfirmTitle: '确定下架该商品吗？',
                    accessKey: 'goods:mgmt:reserveGoods:sellStatus',
                  },
                  {
                    text: '操作日志',
                    initialValue: {
                      text: '下架',
                      visible:
                        '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 2\r\n}}}',
                      customExpression:
                        "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      permissionType: 'equityGoods',\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                      usePopconfirm: true,
                      popconfirmTitle: '确定下架该商品吗？',
                    },
                    dialog: '操作日志',
                    customExpression:
                      "{{(ctx, deps) => {\r\n  const setGlobalData = deps.setGlobalData\r\n  const id = ctx.record.id\r\n  setGlobalData('id', id)\r\n}}}",
                    accessKey: 'goods:mgmt:reserveGoods:network',
                  },
                  {
                    text: '修改库存',
                    dialog: '库存管理',
                    disabled:
                      '{{(record, deps) => {\r\n  return record &&!record.stockLimit\r\n}}}',
                  },
                ],
              },
              width: 200,
              fixed: 'right',
              showLen: 4,
            },
            apiPath: 'api',
            rowKey: 'proCode',
            request:
              "{{async (ctx, deps) => {\r\n  const { request } = deps\r\n  const { params } = ctx\r\n  const res = await request({\r\n    uri: '/api/tenant/reservation/product/page',\r\n    params: {\r\n      ...params,\r\n      proStatus: params.tabActiveKey,\r\n      sortRule: 'updateTime'\r\n    },\r\n    method: 'POST',\r\n  })\r\n  const tagColors = {\r\n    2: 'success',\r\n    3: 'warning',\r\n    1: 'processing',\r\n    4: 'error'\r\n  }\r\n  res.records = res.records.map((item) => {\r\n    return {\r\n      ...item,\r\n      tagColor: tagColors[item.proStatus]\r\n    }\r\n  })\r\n  return res\r\n}}}",
            toolBarRender: {
              data: [
                {
                  text: '新建',
                  size: 'middle',
                  buttonType: 'primary',
                  icon: 'PlusOutlined',
                  customExpression:
                    '{{(ctx, deps) => {\r\n  deps.goTo(`/lowcodePreview/reserveGoodsMgmt/handle/add`)\r\n}}}',
                  accessKey: 'goods:mgmt:reserveGoods:add',
                },
                {
                  text: '批量上架',
                  disabled: '',
                  customExpression:
                    "{{async (ctx, deps) => {\r\n  const ids = ctx.selectedRows.map(item => item.id)\r\n  if (ids.length === 0) {\r\n    deps.antdMsg(ctx.$t('请选择商品'), 'warning')\r\n    return\r\n  }\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids,\r\n      proStatus: 2\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('上架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                  accessKey: 'goods:mgmt:reserveGoods:sellStatus',
                },
                {
                  text: '批量下架',
                  customExpression:
                    "{{async (ctx, deps) => {\r\n  const ids = ctx.selectedRows.map(item => item.id)\r\n  if (ids.length === 0) {\r\n    deps.antdMsg(ctx.$t('请选择商品'), 'warning')\r\n    return\r\n  }\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids,\r\n      permissionType: 'equityGoods',\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                  accessKey: 'goods:mgmt:reserveGoods:sellStatus',
                },
              ],
            },
            rowSelection: {
              enabled: true,
            },
            pagination: {},
            scroll: {
              x: 2000,
            },
            tabs: '{{async (ctx, deps) => {\r\n  const dataSources = deps.dataSources\r\n  const $t = ctx.$t\r\n  return dataSources.goodsStatusAsync($t)\r\n}}}',
          },
          'x-designable-id': 'zphvu2to7gd',
          'x-index': 2,
        },
      },
      'x-designable-id': '7myaw7xbsr0',
    },
  },
  权益商品列表: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
      languagePackage: '$t-web',
    },
    schema: {
      type: 'object',
      properties: {
        gmool9ynz37: {
          type: 'void',
          'x-component': 'Dialog',
          'x-component-props': {
            dialogName: 'modal1',
            maskStyle: {},
            bodyStyle: {},
            style: {},
            okButtonProps: {},
            cancelButtonProps: {},
            title: 'modal1',
          },
          'x-designable-id': 'gmool9ynz37',
          'x-index': 0,
        },
        gvmrl2mezic: {
          type: 'void',
          'x-component': 'ProTable',
          'x-component-props': {
            columns: {
              data: [
                {
                  title: '商品编号',
                  dataIndex: 'proCode',
                  ellipsis: true,
                  search: true,
                  fixed: '',
                  width: 150,
                },
                {
                  title: '商品名称',
                  dataIndex: 'proName',
                  ellipsis: true,
                  search: true,
                },
                {
                  title: '权益名称',
                  dataIndex: 'relationName',
                  ellipsis: true,
                  search: true,
                  tooltip: '',
                  width: 150,
                },
                {
                  title: '权益期限',
                  dataIndex: 'equityExpirationDesc',
                  ellipsis: true,
                  search: false,
                  width: 120,
                },
                {
                  title: '销售库存',
                  dataIndex: 'availableStockNum',
                  ellipsis: true,
                  search: false,
                  isRender: true,
                  render:
                    "{{(ctx) => {\r\n  const { stockLimit, availableStockNum } = ctx.record\r\n  return stockLimit ? availableStockNum: ctx.$t('不限制')\r\n}}}",
                  width: 120,
                },
                {
                  title: '兑换类型',
                  dataIndex: 'exchangeType',
                  isRender: false,
                  renderFormItem: 'select',
                  rangCacheName: 'exchangeType',
                  rangSstartName: 'exchangeTypeStart',
                  rangEndName: 'exchangeTypeEnd',
                  selectRequest: 'EQ_ExchangeTypeList',
                  search: true,
                  isRenderFormItem: true,
                  initialValue: {
                    title: '兑换类型',
                    dataIndex: 'exchangeType',
                    isRender: false,
                    renderFormItem: 'select',
                    rangCacheName: 'exchangeType',
                    rangSstartName: 'exchangeTypeStart',
                    rangEndName: 'exchangeTypeEnd',
                    selectRequest: 'EQ_ExchangeTypeList',
                    search: true,
                    isRenderFormItem: true,
                  },
                  width: 120,
                },
                {
                  title: '更新时间',
                  dataIndex: 'updateTime',
                  ellipsis: true,
                  search: true,
                  isRenderFormItem: true,
                  initialValue: {
                    title: '更新时间',
                    dataIndex: 'updateTime',
                    ellipsis: true,
                    search: true,
                    rangCacheName: 'updateTime',
                    rangSstartName: 'updateTimeStart',
                    rangEndName: 'updateTimeEnd',
                    isRenderFormItem: true,
                    renderFormItem: 'rangePicker',
                  },
                  rangCacheName: 'updateTime',
                  rangSstartName: 'updateTimeStart',
                  tooltip: '',
                  renderFormItem: 'rangePicker',
                  rangStartName: 'updateTimeStart',
                  rangEndName: 'updateTimeEnd',
                  width: 150,
                },
                {
                  title: '状态',
                  dataIndex: 'proStatusName',
                  ellipsis: true,
                  search: false,
                  isRenderFormItem: true,
                  renderFormItem: 'select',
                  isRender: false,
                  initialValue: {
                    title: '状态',
                    dataIndex: 'proStatus',
                    ellipsis: true,
                    search: true,
                    isRenderFormItem: true,
                    renderFormItem: 'select',
                    isRender: false,
                    selectRequest: 'equityGoodsStatusAsync',
                  },
                  fixed: 'right',
                  width: 110,
                  rangStartName: 'proStatusNameStart',
                  rangEndName: 'proStatusNameEnd',
                  selectRequest: 'equityGoodsStatusAsync',
                  tag: true,
                },
                {
                  title: '状态',
                  dataIndex: 'proStatus',
                  hideInTable: true,
                  search: false,
                  rangStartName: 'proStatusStart',
                  rangEndName: 'proStatusEnd',
                  renderFormItem: 'select',
                  selectRequest: 'equityGoodsStatusAsync',
                },
                {
                  title: '客户',
                  dataIndex: 'customerName',
                  initialValue: {
                    title: '客户',
                    dataIndex: 'customerName',
                  },
                  width: 200,
                },
                {
                  title: '客户协议',
                  dataIndex: 'agreementName',
                  initialValue: {
                    title: '客户协议',
                    dataIndex: 'agreementName',
                    initialValue: {
                      title: '客户协议',
                      dataIndex: 'agreementName',
                    },
                  },
                  width: 200,
                },
              ],
            },
            action: {
              buttons: {
                data: [
                  {
                    text: '编辑',
                    type: 'primary',
                    disabled: '',
                    customExpression:
                      '{{(ctx, deps) => {\r\n  const id = ctx.record.id\r\n  deps.goTo(`/commodity/equityGoodsMgmt/handle/edit?id=${id}`)\r\n}}}',
                    visible: '',
                    accessKey: 'goods:mgmt:equityGoods:edit',
                  },
                  {
                    text: '查看网点',
                    customExpression:
                      '{{(ctx, deps) => {\r\n  const record = ctx.record\r\n  const { equityGetResp, projectId, categoryType } = record\r\n  deps.goTo(`/lowcodePreview/networkMgmt/equityGoods?equityCode=${equityGetResp.equityCode}&projectId=${projectId}&categoryType=${categoryType}`)\r\n}}}',
                    accessKey: 'goods:mgmt:equityGoods:network',
                  },
                  {
                    text: '上架',
                    visible:
                      '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 4 || proStatus === 1\r\n}}}',
                    usePopconfirm: true,
                    popconfirmTitle: '确定上架该商品吗？',
                    customExpression:
                      "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      permissionType: 'equityGoods',\r\n      proStatus: 2\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('上架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                    accessKey: 'goods:mgmt:equityGoods:sellStatus',
                  },
                  {
                    text: '下架',
                    visible:
                      '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 2\r\n}}}',
                    customExpression:
                      "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      permissionType: 'equityGoods',\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                    usePopconfirm: true,
                    popconfirmTitle: '确定下架该商品吗？',
                    accessKey: 'goods:mgmt:equityGoods:sellStatus',
                  },
                  {
                    text: '操作日志',
                    initialValue: {
                      text: '下架',
                      visible:
                        '{{(record) => {\r\n  const {proStatus} = record\r\n  return proStatus === 2\r\n}}}',
                      customExpression:
                        "{{async (ctx, deps) => {\r\n  const {id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids: [id],\r\n      permissionType: 'equityGoods',\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                      usePopconfirm: true,
                      popconfirmTitle: '确定下架该商品吗？',
                    },
                    dialog: '操作日志',
                    customExpression:
                      "{{(ctx, deps) => {\r\n  const setGlobalData = deps.setGlobalData\r\n  const id = ctx.record.id\r\n  setGlobalData('id', id)\r\n}}}",
                    accessKey: 'goods:mgmt:equityGoods:list:operation',
                  },
                  {
                    text: '修改库存',
                    dialog: '库存管理',
                    disabled:
                      '{{(record, deps) => {\r\n  return record &&!record.stockLimit\r\n}}}',
                    customExpression:
                      '{{(ctx, deps) => {\r\n  deps.setGlobalData({\r\n    id: ctx.record.id\r\n  })\r\n}}}',
                  },
                ],
              },
              width: 200,
              fixed: 'right',
              showLen: 4,
            },
            apiPath: 'api',
            rowKey: 'proCode',
            request:
              "{{async (ctx, deps) => {\r\n  const { request } = deps\r\n  const { params } = ctx\r\n  const res = await request({\r\n    uri: '/api/tenant/equity/product/page',\r\n    params: {\r\n      ...params,\r\n      proStatus: params.tabActiveKey,\r\n      productType: 2\r\n    },\r\n    method: 'POST',\r\n  })\r\n  const tagColors = {\r\n    2: 'success',\r\n    3: 'warning',\r\n    1: 'processing',\r\n    4: 'error'\r\n  }\r\n  res.records = res.records.map((item) => {\r\n    return {\r\n      ...item,\r\n      tagColor: tagColors[item.proStatus]\r\n    }\r\n  })\r\n  return res\r\n}}}",
            toolBarRender: {
              data: [
                {
                  text: '新建',
                  size: 'middle',
                  buttonType: 'primary',
                  icon: 'PlusOutlined',
                  customExpression:
                    '{{(ctx, deps) => {\r\n  deps.goTo(`/commodity/equityGoodsMgmt/handle/add`)\r\n}}}',
                  accessKey: 'goods:mgmt:equityGoods:add',
                },
                {
                  text: '批量上架',
                  disabled: '',
                  customExpression:
                    "{{async (ctx, deps) => {\r\n  const ids = ctx.selectedRows.map(item => item.id)\r\n  if (ids.length === 0) {\r\n    deps.antdMsg(ctx.$t('请选择商品'), 'warning')\r\n    return\r\n  }\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids,\r\n      permissionType: 'equityGoods',\r\n      proStatus: 2\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('上架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                  accessKey: 'goods:mgmt:equityGoods:sellStatus',
                },
                {
                  text: '批量下架',
                  customExpression:
                    "{{async (ctx, deps) => {\r\n  const ids = ctx.selectedRows.map(item => item.id)\r\n  if (ids.length === 0) {\r\n    deps.antdMsg(ctx.$t('请选择商品'), 'warning')\r\n    return\r\n  }\r\n  deps.request({\r\n    uri: '/api/tenant/product/batchUpdateStatus',\r\n    params:{\r\n      ids,\r\n      permissionType: 'equityGoods',\r\n      proStatus: 4\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('下架成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
                  accessKey: 'goods:mgmt:equityGoods:sellStatus',
                },
              ],
            },
            rowSelection: {
              enabled: true,
            },
            pagination: {},
            scroll: {
              x: 1800,
            },
            tabs: '{{async (ctx, deps) => {\r\n  const dataSources = deps.dataSources\r\n  const $t = ctx.$t\r\n  return dataSources.goodsStatusAsync($t)\r\n}}}',
          },
          'x-designable-id': 'gvmrl2mezic',
          'x-index': 1,
        },
        '015g5ufpsrt': {
          type: 'void',
          'x-component': 'Dialog',
          'x-component-props': {
            dialogName: '库存管理',
            title: '库存管理',
            width: '600',
            confirm:
              "{{async (ctx, deps) => {\r\n  const values = await ctx.form.submit()\r\n  console.log(ctx, 888)\r\n  const {availableStockNum, id} = ctx.record\r\n  deps.request({\r\n    uri: '/api/tenant/product/updateStockNum',\r\n    params: {\r\n      id,\r\n      permissionType: 'equityGoods',\r\n      ...values.stock\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('修改成功'), 'success')\r\n  ctx.actionRef?.reload()\r\n}}}",
            maskStyle: {},
            bodyStyle: {},
            style: {},
            okButtonProps: {},
            cancelButtonProps: {},
          },
          'x-designable-id': '015g5ufpsrt',
          'x-index': 2,
          properties: {
            stock: {
              type: 'object',
              'x-component': 'Form',
              labelCol: 6,
              wrapperCol: 12,
              'x-validator': [],
              'x-component-props': {},
              'x-designable-id': 'j9tpna9o6d8',
              'x-index': 0,
              name: 'stock',
              title: '修改库存表单',
              properties: {
                stockOperationType: {
                  title: '库存',
                  'x-decorator': 'FormItem',
                  'x-component': 'Select',
                  'x-validator': [],
                  'x-component-props': {},
                  'x-decorator-props': {
                    colon: true,
                  },
                  required: true,
                  enum: [
                    {
                      children: [],
                      label: '增加',
                      value: 'add',
                    },
                    {
                      children: [],
                      label: '减少',
                      value: 'sub',
                    },
                  ],
                  name: 'stockOperationType',
                  'x-designable-id': 'owe0k9t3xdc',
                  'x-index': 0,
                  default: 'add',
                },
                number: {
                  type: 'number',
                  title: '数量',
                  'x-decorator': 'FormItem',
                  'x-component': 'NumberPicker',
                  'x-validator': [],
                  'x-component-props': {
                    decimalSeparator: '',
                    min: 1,
                  },
                  'x-decorator-props': {},
                  name: 'number',
                  required: true,
                  'x-designable-id': 'lssxm0thohj',
                  'x-index': 1,
                  message: '请输入',
                },
              },
            },
          },
        },
        '7p9qvtnahk4': {
          type: 'void',
          'x-component': 'Dialog',
          'x-component-props': {
            dialogName: '操作日志',
            title: '操作日志',
            width: '800',
            maskStyle: {},
            bodyStyle: {},
            style: {},
            showFooter: false,
          },
          'x-designable-id': '7p9qvtnahk4',
          'x-index': 3,
          properties: {
            '1y1psnc5iec': {
              type: 'void',
              'x-component': 'ProTable',
              'x-component-props': {
                columns: {
                  data: [
                    {
                      title: '操作项目',
                      dataIndex: 'operationItem',
                      ellipsis: true,
                      search: false,
                    },
                    {
                      title: '操作详情',
                      dataIndex: 'operationDetail',
                    },
                    {
                      title: '操作人',
                      dataIndex: 'operator',
                    },
                    {
                      title: '操作时间',
                      dataIndex: 'operationTime',
                    },
                  ],
                },
                action: {
                  buttons: {
                    data: [],
                  },
                },
                apiPath: 'api',
                rowKey: 'operationTime',
                toolBarRender: {
                  data: [],
                },
                rowSelection: {},
                pagination: {},
                request:
                  "{{async (ctx, deps) => {\r\n  const { request,getGlobalData } = deps\r\n  const id = getGlobalData('id')\r\n  const { params } = ctx\r\n  const res = request({\r\n    uri: '/api/tenant/global/operation/log/query',\r\n    params: {\r\n      ...params,\r\n      type: 'PRODUCT',\r\n      id: id\r\n    },\r\n    method: 'POST',\r\n  })\r\n  return res\r\n}}}",
                scroll: {
                  x: 700,
                },
              },
              'x-designable-id': '1y1psnc5iec',
              'x-index': 0,
            },
          },
        },
      },
      'x-designable-id': 's8mi0yf3vm2',
    },
  },
  权益商品: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
      languagePackage: 'intl-web',
    },
    schema: {
      type: 'object',
      properties: {
        jgy7s0zqacv: {
          type: 'void',
          'x-component': 'ProTable',
          'x-component-props': {
            columns: {
              data: [
                {
                  title: '网点编码',
                  dataIndex: 'networkCode',
                  ellipsis: true,
                  search: true,
                  fixed: '',
                  width: 140,
                },
                {
                  title: '网点名称',
                  dataIndex: 'networkName',
                  ellipsis: true,
                  search: true,
                },
                {
                  title: '服务站点',
                  dataIndex: 'stationName',
                  ellipsis: true,
                  search: true,
                  isRender: false,
                },
                {
                  title: '网点类型',
                  dataIndex: 'networkTypeName',
                  isRender: true,
                  rangCacheName: 'exchangeType',
                  rangSstartName: 'exchangeTypeStart',
                  search: false,
                  isRenderFormItem: true,
                  initialValue: {
                    title: '兑换类型',
                    dataIndex: 'exchangeType',
                    isRender: false,
                    renderFormItem: 'select',
                    rangCacheName: 'exchangeType',
                    rangSstartName: 'exchangeTypeStart',
                    rangEndName: 'exchangeTypeEnd',
                    selectRequest: 'EQ_ExchangeTypeList',
                    search: true,
                    isRenderFormItem: true,
                  },
                  ellipsis: true,
                  rangStartName: 'networkTypeNameStart',
                  rangEndName: 'networkTypeNameEnd',
                  render:
                    "{{(ctx, deps) => {\r\n  const record = ctx.record\r\n  const { networkType, loungeTypeName } = record\r\n  return networkType || loungeTypeName || '-'\r\n}}}",
                },
                {
                  title: '地区',
                  dataIndex: 'cityName',
                  ellipsis: true,
                  search: false,
                  isRenderFormItem: true,
                  initialValue: {
                    title: '更新时间',
                    dataIndex: 'updateTime',
                    ellipsis: true,
                    search: true,
                    rangCacheName: 'updateTime',
                    rangSstartName: 'updateTimeStart',
                    rangEndName: 'updateTimeEnd',
                    isRenderFormItem: true,
                    renderFormItem: 'rangePicker',
                  },
                  rangCacheName: 'updateTime',
                  rangSstartName: 'updateTimeStart',
                  tooltip: '',
                  rangStartName: 'updateTimeStart',
                  rangEndName: 'updateTimeEnd',
                },
                {
                  title: '状态',
                  dataIndex: 'statusName',
                },
                {
                  title: '网点状态',
                  dataIndex: 'networkStatusName',
                },
              ],
            },
            action: {
              buttons: {
                data: [],
              },
              width: 200,
              fixed: 'right',
              showLen: 4,
            },
            apiPath: 'api',
            rowKey: 'id',
            request:
              "{{async (ctx, deps) => {\r\n  const { request, getUrlAllParams } = deps\r\n  const { params } = ctx\r\n  const {\r\n    proCode,\r\n    projectId,\r\n    equityCode,\r\n    categoryType,\r\n    equityCouponCode,\r\n    networkLimitScope,\r\n  } = getUrlAllParams()\r\n  console.log(getUrlAllParams(), 8888)\r\n  const res = await request({\r\n    uri: '/api/tenant/product/findNetworksByPage',\r\n    params: {\r\n      ...params,\r\n      projectId,\r\n      proCode,\r\n      equityCode,\r\n      categoryType,\r\n      equityCouponCode,\r\n      networkCodes: networkLimitScope\r\n        ? JSON.parse(networkLimitScope)\r\n        : null,\r\n    },\r\n    method: 'POST',\r\n  })\r\n  return res\r\n}}}",
            toolBarRender: {
              data: [],
            },
            rowSelection: {
              enabled: false,
            },
            pagination: {},
            scroll: {
              x: null,
            },
          },
          'x-designable-id': 'jgy7s0zqacv',
          'x-index': 0,
        },
      },
      'x-designable-id': '7ghp68dzey6',
    },
  },
  登录页设置: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
    },
    schema: {
      type: 'object',
      properties: {
        '7tg0ofvvh2t': {
          type: 'void',
          title: 'MultiLanguageDialog',
          'x-component': 'MultiLanguageDialog',
          'x-component-props': {
            dialogName: '弹窗多语言对话框',
            formType: 'editor',
            nameKey: 'authDialogText',
          },
          'x-designable-id': '7tg0ofvvh2t',
          'x-index': 0,
        },
        snld7z85tyx: {
          type: 'void',
          'x-component': 'FormLayout',
          'x-component-props': {
            labelCol: 7,
            wrapperCol: 10,
          },
          'x-designable-id': 'snld7z85tyx',
          'x-index': 1,
          'x-reactions': {
            dependencies: [
              {
                property: 'value',
                type: 'any',
              },
            ],
            fulfill: {
              run: "$effect(async ()=>{\r\n  console.log(1111)\r\n  const res = await request({\r\n    uri: '/api/tenant/global/html/setting/get',\r\n    method: 'GET',\r\n  })\r\n  $form.setValues(res.settingJson)\r\n},[])",
            },
          },
          properties: {
            '30azodr1jz1': {
              type: 'void',
              'x-component': 'LabelTitle',
              'x-component-props': {
                title: '登录页设置',
                extra: '若配置为空，取默认配置',
              },
              'x-designable-id': '30azodr1jz1',
              'x-index': 0,
            },
            banner_cn: {
              type: 'string',
              title: '登录页banner(CN)',
              'x-decorator': 'FormItem',
              'x-component': 'UploadImage',
              'x-component-props': {
                apiName: 'tenant',
              },
              'x-validator': [],
              'x-decorator-props': {},
              required: true,
              'x-designable-id': 'a17efscvxvq',
              'x-index': 1,
              name: 'banner_cn',
            },
            banner_en: {
              type: 'string',
              title: '登录页banner(EN)',
              'x-decorator': 'FormItem',
              'x-component': 'UploadImage',
              'x-component-props': {
                apiName: 'tenant',
              },
              'x-validator': [],
              'x-decorator-props': {},
              required: true,
              'x-designable-id': '7hzmhz8tlh9',
              'x-index': 2,
              name: 'banner_en',
            },
            pageBackground: {
              type: 'string | number',
              title: '页面背景',
              'x-decorator': 'FormItem',
              'x-component': 'Radio.Group',
              enum: [
                {
                  children: [],
                  label: '纯色',
                  value: 'color',
                },
                {
                  children: [],
                  label: '图片',
                  value: 'image',
                },
              ],
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'pageBackground',
              required: true,
              default: 'color',
              'x-designable-id': 'aoyx1wxuxlc',
              'x-index': 3,
            },
            bgColor: {
              type: 'string',
              title: '背景颜色',
              'x-decorator': 'FormItem',
              'x-component': 'ColorPicker',
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'bgColor',
              required: true,
              'x-designable-id': 'bu41tga6p6o',
              'x-index': 4,
              description: '\n用于登录页面背景颜色设置',
              'x-reactions': {
                dependencies: [
                  {
                    property: 'value',
                    type: 'string | number',
                    source: 'snld7z85tyx.pageBackground',
                    name: 'pageBackground',
                  },
                ],
                fulfill: {
                  state: {
                    visible: "{{$deps.pageBackground === 'color'}}",
                  },
                },
              },
            },
            backgroundImage: {
              type: 'string',
              title: '页面背景图',
              'x-decorator': 'FormItem',
              'x-component': 'UploadImage',
              'x-component-props': {
                apiName: 'tenant',
              },
              'x-validator': [],
              'x-decorator-props': {},
              required: true,
              'x-designable-id': '1skscyj94ay',
              'x-index': 5,
              name: 'backgroundImage',
              description: '用于登录页面背景图设置',
              'x-reactions': {
                dependencies: [
                  {
                    property: 'value',
                    type: 'string | number',
                    source: 'snld7z85tyx.pageBackground',
                    name: 'pageBackground',
                  },
                ],
                fulfill: {
                  state: {
                    visible: "{{$deps.pageBackground === 'image'}}",
                  },
                },
              },
            },
            authDialogShow: {
              type: 'string | number',
              title: '是否显示授权弹窗',
              'x-decorator': 'FormItem',
              'x-component': 'Radio.Group',
              enum: [
                {
                  children: [],
                  label: '不显示',
                  value: 'no',
                },
                {
                  children: [],
                  label: '首次弹窗',
                  value: 'first',
                },
                {
                  children: [],
                  label: '每次弹窗',
                  value: 'every',
                },
              ],
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'authDialogShow',
              required: true,
              default: 'no',
              'x-designable-id': 'pi0hjw3d2a3',
              'x-index': 6,
            },
            dialogText: {
              type: 'string',
              title: '弹窗文案配置',
              'x-decorator': 'FormItem',
              'x-component': 'Input',
              'x-validator': [],
              'x-component-props': {
                addonAfter: '设置多语言',
                addonAfterClickExpression:
                  "{{(ctx, deps) => {\r\n  deps.useDialogInstances().get('弹窗多语言对话框').open()\r\n}}}",
              },
              'x-decorator-props': {
                labelCol: 7,
              },
              'x-designable-id': 'ngle2pn53li',
              'x-index': 7,
              name: 'dialogText',
              'x-reactions': {
                dependencies: [
                  {
                    property: 'value',
                    type: 'string | number',
                    source: 'snld7z85tyx.authDialogShow',
                    name: 'authDialogShow',
                  },
                ],
                fulfill: {
                  state: {
                    visible: "{{$deps.authDialogShow !== 'no'}}",
                  },
                },
              },
            },
            '3t0bbjzu1db': {
              type: 'void',
              title: 'Button',
              'x-component': 'Button',
              'x-component-props': {
                children: '保存',
                type: 'primary',
                onClickExpression:
                  "{{async (ctx, deps) => {\r\n  const values = await ctx.form.submit()\r\n  console.log(values, 888)\r\n  await deps.request({\r\n    uri: '/api/tenant/global/html/setting/save',\r\n    params: {\r\n      settingJson: values\r\n    },\r\n    method: 'POST',\r\n  })\r\n  deps.antdMsg(ctx.$t('保存成功'), 'success')\r\n}}}",
                style: {
                  margin: '20px 0px 0px 250px',
                },
                size: 'large',
              },
              'x-designable-id': '3t0bbjzu1db',
              'x-index': 8,
            },
          },
        },
      },
      'x-designable-id': 'otjn4vwa471',
    },
  },
  测试页面: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
    },
    schema: {
      type: 'object',
      properties: {
        '2v5ugknbk44': {
          type: 'void',
          'x-component': 'Form',
          labelCol: 6,
          wrapperCol: 12,
          'x-validator': [],
          'x-component-props': {
            labelCol: 6,
            wrapperCol: 12,
          },
          'x-designable-id': '2v5ugknbk44',
          'x-index': 0,
          properties: {
            Input: {
              type: 'string',
              title: 'Input',
              'x-decorator': 'FormItem',
              'x-component': 'Input',
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'Input',
              required: true,
              'x-designable-id': 'paermywuc6c',
              'x-index': 0,
              default: '123',
            },
            '[expirationStart,expirationEnd]': {
              type: 'string[]',
              title: 'DateRangePicker',
              'x-decorator': 'FormItem',
              'x-component': 'DatePicker.RangePicker',
              'x-validator': [],
              'x-component-props': {
                format: 'YYYY-MM-DD hh:mm:ss',
              },
              'x-decorator-props': {},
              name: '[expirationStart,expirationEnd]',
              'x-designable-id': 'a0fm570v41r',
              'x-index': 1,
            },
            anvm7m8jl0s: {
              type: 'number',
              title: 'NumberPicker',
              'x-decorator': 'FormItem',
              'x-component': 'NumberPicker',
              'x-validator': [],
              'x-component-props': {
                precision: null,
              },
              'x-decorator-props': {},
              'x-reactions': {
                dependencies: [
                  {
                    property: 'value',
                    type: 'any',
                  },
                ],
                fulfill: {
                  run: '$effect(()=>{\r\n  $self.componentProps.precision = 2\r\n},[])',
                },
              },
              'x-designable-id': 'anvm7m8jl0s',
              'x-index': 2,
            },
            ro3i8yxoej8: {
              type: 'void',
              title: 'Button',
              'x-component': 'Button',
              'x-component-props': {
                children: '提交',
                onClickExpression:
                  '{{(ctx, deps) => {\r\n  ctx.form.submit().then(res => {\r\n    console.log(res, 8888)\r\n  })\r\n}}}',
              },
              'x-designable-id': 'ro3i8yxoej8',
              'x-index': 3,
            },
          },
        },
      },
      'x-designable-id': 'wxxizmfgbom',
    },
  },
  接口设置: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
    },
    schema: {
      type: 'object',
      properties: {
        a1gkkae04xm: {
          type: 'void',
          'x-component': 'FormLayout',
          'x-component-props': {
            labelCol: 4,
            wrapperCol: 10,
          },
          'x-designable-id': 'a1gkkae04xm',
          'x-index': 0,
          'x-reactions': {
            dependencies: [
              {
                property: 'value',
                type: 'any',
              },
            ],
            fulfill: {
              run: "$effect(async ()=>{\r\n  $showLoading()\r\n  const data = await request({\r\n    uri: `/api/tenant/interface/get`,\r\n    params: {},\r\n    method: 'POST',\r\n  })\r\n  $form.setValues(data)\r\n  $hideLoading()\r\n},[])",
            },
          },
          properties: {
            ntbv3z2ofjt: {
              type: 'void',
              'x-component': 'LabelTitle',
              'x-component-props': {
                title: '核销查询校验',
                extra: '',
              },
              'x-designable-id': 'ntbv3z2ofjt',
              'x-index': 0,
            },
            id: {
              type: 'string',
              title: 'id',
              'x-decorator': 'FormItem',
              'x-component': 'Input',
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'id',
              'x-display': 'hidden',
              'x-designable-id': 'eyigl81fn5g',
              'x-index': 1,
            },
            verifyQueryPreCheckUrl: {
              type: 'string',
              title: '核销查询前置校验',
              'x-decorator': 'FormItem',
              'x-component': 'Input',
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'verifyQueryPreCheckUrl',
              'x-designable-id': 'zssrwhxwzzu',
              'x-index': 2,
            },
            verifyQueryCheckUrl: {
              type: 'string',
              title: '核销查询校验',
              'x-decorator': 'FormItem',
              'x-component': 'Input',
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'verifyQueryCheckUrl',
              description:
                '若核销查询时需项目侧校验，此处填入项目校验的API，不需要校验则留空',
              'x-designable-id': 'cr9ox4wx68f',
              'x-index': 3,
            },
            verifyOrderCheckUrl: {
              type: 'string',
              title: '核销下单校验',
              'x-decorator': 'FormItem',
              'x-component': 'Input',
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'verifyOrderCheckUrl',
              description:
                '若核销下单时需项目侧校验，此处填入项目校验的API，不需要校验则留空',
              'x-designable-id': 'a977gen6r8r',
              'x-index': 4,
            },
            verifyOrderCancelUrl: {
              type: 'string',
              title: '核销取消订单',
              'x-decorator': 'FormItem',
              'x-component': 'Input',
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'verifyOrderCancelUrl',
              description: '',
              'x-designable-id': '1nd91yqg2ar',
              'x-index': 5,
            },
            thirdPartyPayUrl: {
              type: 'string',
              title: '第三方支付',
              'x-decorator': 'FormItem',
              'x-component': 'Input',
              'x-validator': [],
              'x-component-props': {},
              'x-decorator-props': {},
              name: 'thirdPartyPayUrl',
              description: '若下单时需要请求第三方支付，此处填入支付请求地址',
              'x-designable-id': 'la7w6vywyfu',
              'x-index': 6,
            },
            '1hrdetypvrz': {
              type: 'void',
              title: 'Button',
              'x-component': 'Button',
              'x-component-props': {
                children: '提交',
                type: 'primary',
                size: 'large',
                style: {
                  margin: '50px 0px 0px 230px',
                },
                onClickExpression:
                  "{{async (ctx, deps) => {\r\n  const values = ctx.form.values\r\n  try{\r\n    deps.$showLoading()\r\n      const res = await deps.request({\r\n      uri: '/api/tenant/interface/saveOrUpdate',\r\n      params: values,\r\n      method: 'POST',\r\n    })\r\n    deps.antdMsg(ctx.$t('提交成功'), 'success')\r\n    deps.$hideLoading()\r\n  } catch {\r\n    deps.$hideLoading()\r\n  }\r\n}}}",
              },
              'x-designable-id': '1hrdetypvrz',
              'x-index': 7,
            },
          },
        },
      },
      'x-designable-id': '77jzktqdef3',
    },
  },
  酒店订单列表: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
    },
    schema: {
      type: 'object',
      properties: {
        k846hrjv3s2: {
          type: 'void',
          'x-component': 'ProTable',
          'x-component-props': {
            columns: {
              data: [
                {
                  title: '订单编号',
                  dataIndex: 'orderNo',
                  ellipsis: true,
                  search: true,
                  fixed: 'left',
                  width: 160,
                },
                {
                  title: '酒店名称',
                  dataIndex: 'hotelName',
                  ellipsis: true,
                  search: true,
                },
                {
                  title: '酒店编码',
                  dataIndex: 'hotelCode',
                  ellipsis: true,
                  search: true,
                },
                {
                  title: '房型名称 ',
                  dataIndex: 'roomName',
                  ellipsis: true,
                  search: false,
                },
                {
                  title: '房型编码',
                  dataIndex: 'roomCode',
                  ellipsis: true,
                  search: true,
                },
                {
                  title: '酒店城市',
                  dataIndex: 'hotelCity',
                  ellipsis: true,
                  search: false,
                },
                {
                  title: '客房数量',
                  dataIndex: 'roomNum',
                  ellipsis: true,
                  search: false,
                },
                {
                  title: '入住时间',
                  dataIndex: 'checkInTime',
                  renderFormItem: 'rangePicker',
                  rangStartName: 'checkInTimeStart',
                  rangEndName: 'checkInTimeEnd',
                  search: true,
                },
                {
                  title: '离店时间',
                  dataIndex: 'checkOutTime',
                  renderFormItem: 'rangePicker',
                  rangStartName: 'checkOutTimeStart',
                  rangEndName: 'checkOutTimeEnd',
                  search: true,
                },
                {
                  title: '支付方式',
                  dataIndex: 'payTypeName',
                },
                {
                  title: '支付方式',
                  dataIndex: 'actualPayAmount',
                  renderFormItem: 'select',
                  selectRequest: 'Other_ExchangeTypeList',
                  rangEndName: 'actualPayAmountEnd',
                  rangStartName: 'actualPayAmountStart',
                  search: true,
                  ellipsis: false,
                  hideInTable: true,
                },
                {
                  title: '实付金额',
                  dataIndex: 'actualPayAmount',
                },
                {
                  title: '实付权益',
                  dataIndex: 'payEquityNum',
                },
                {
                  title: '会籍ID',
                  dataIndex: 'memberShipCode',
                  search: true,
                },
                {
                  title: '下单时间',
                  dataIndex: 'createTime',
                  renderFormItem: 'rangePicker',
                  rangStartName: 'createTimeStart',
                  rangEndName: 'createTimeEnd',
                  search: true,
                  initialValueExpression:
                    "{{(ctx, deps) => {\r\n  console.log([\r\n    `${deps.$dayjs().subtract(30, 'days').format('YYYY-MM-DD')} 00:00:00`,\r\n    `${deps.$dayjs().format('YYYY-MM-DD')} 23:59:59`,\r\n  ])\r\n  return [\r\n    `${deps.$dayjs().subtract(30, 'days').format('YYYY-MM-DD')} 00:00:00`,\r\n    `${deps.$dayjs().format('YYYY-MM-DD')} 23:59:59`,\r\n  ]\r\n}}}",
                  initialValueMonth: true,
                },
                {
                  title: '取消时间',
                  dataIndex: 'cancelTime',
                  width: 130,
                  renderFormItem: 'rangePicker',
                  rangStartName: 'cancelTimeStart',
                  rangEndName: 'cancelTimeEnd',
                  search: true,
                },
                {
                  title: '订单状态',
                  dataIndex: 'orderStatusName',
                  width: 130,
                },
              ],
            },
            action: {
              buttons: {
                data: [
                  {
                    text: '详情',
                    type: 'primary',
                  },
                ],
              },
              fixed: 'right',
            },
            apiPath: 'api',
            rowKey: 'orderNo',
            toolBarRender: {
              data: [],
            },
            rowSelection: {},
            pagination: {},
            scroll: {
              x: 2600,
            },
            request:
              "{{async (ctx, deps) => {\r\n  const { request } = deps\r\n  const { params } = ctx\r\n  const res = await request({\r\n    uri: '/api/tenant/order/ijd/page',\r\n    params: {\r\n      ...params,\r\n      proStatus: params.tabActiveKey,\r\n    },\r\n    method: 'POST',\r\n  })\r\n  const tagColors = {\r\n    2: 'success',\r\n    3: 'warning',\r\n    1: 'processing',\r\n    4: 'error'\r\n  }\r\n  res.records = res.records.map((item) => {\r\n    return {\r\n      ...item,\r\n      tagColor: tagColors[item.proStatus]\r\n    }\r\n  })\r\n  return res\r\n}}}",
            tabs: "{{async (ctx, deps) => {\r\n  const $t = ctx.$t\r\n  return [\r\n    {\r\n      label: $t('全部'),\r\n      value: '',\r\n    },\r\n    {\r\n      label: $t('待处理'),\r\n      value: 'wait_hand',\r\n    },\r\n    {\r\n      label: $t('处理中'),\r\n      value: 'processing',\r\n    },\r\n    {\r\n      label: $t('待发放'),\r\n      value: 'wait_provide',\r\n    },\r\n    {\r\n      label: $t('待使用'),\r\n      value: 'wait_use',\r\n    },\r\n    {\r\n      label: $t('服务中'),\r\n      value: 'using',\r\n    },\r\n    {\r\n      label: $t('已完成'),\r\n      value: 'finish',\r\n    },\r\n    {\r\n      label: $t('已取消'),\r\n      value: 'cancel',\r\n    },\r\n    {\r\n      label: $t('订单关闭'),\r\n      value: 'disabled',\r\n    },\r\n  ]\r\n}}}",
          },
          'x-designable-id': 'k846hrjv3s2',
          'x-index': 0,
        },
      },
      'x-designable-id': 'ejitynfelpl',
    },
  },
  核销订单详情: {
    page: {
      labelCol: 6,
      wrapperCol: 12,
      languagePackage: 'intl-web',
      useEffectExpression:
        "{{async (ctx, deps) => {\r\n  const orderNo = deps.getUrlParam('orderNo')\r\n  const data = await deps.request({\r\n    uri: '/api/tenant/order/get',\r\n    params: {\r\n      orderNo,\r\n      permissionType: 'writeOff'\r\n    },\r\n    method: 'POST',\r\n  })\r\n  const getDetails = (details) => {\r\n    try {\r\n      if (details.length === 0) return {}\r\n      const { serviceInfo } = details[0]\r\n      const gymScheduleInfo = productInfo.gymScheduleInfo\r\n        ? productInfo.gymScheduleInfo\r\n        : {}\r\n      return {\r\n        ...serviceInfo,\r\n        ...gymScheduleInfo,\r\n      }\r\n    } catch (err) {\r\n      return {}\r\n    }\r\n  }\r\n  const {\r\n    serviceNum,\r\n    actServiceNum,\r\n    prebookCouponCode,\r\n    appointTime,\r\n    isAppointment,\r\n    useTime,\r\n    expireDateDesc,\r\n    adultTimes,\r\n    childTimes,\r\n  } = getDetails(data.details)\r\n  return {\r\n    ...data,\r\n    serviceNum,\r\n    actServiceNum,\r\n    prebookCouponCode,\r\n    appointTime,\r\n    isAppointment,\r\n    useTime,\r\n    expireDateDesc,\r\n    adultTimes,\r\n    childTimes,\r\n  }\r\n}}}",
    },
    schema: {
      type: 'object',
      properties: {
        '3002y7jjp06': {
          type: 'void',
          title: 'DetailContainer',
          'x-component': 'DetailContainer',
          'x-component-props': {},
          'x-designable-id': '3002y7jjp06',
          'x-index': 0,
        },
        p4dtl0lq2y6: {
          type: 'void',
          title: 'Descriptions',
          'x-component': 'Descriptions',
          'x-designable-id': 'p4dtl0lq2y6',
          'x-index': 1,
          'x-component-props': {
            buttons: [
              {
                children: '取消订单',
                type: 'primary',
                size: 'large',
              },
              {
                children: '返回上一页',
                size: 'large',
              },
            ],
            title: '323131313131',
            bordered: false,
          },
          properties: {
            vgx3a7ic6cx: {
              type: 'void',
              'x-component': 'Descriptions.Item',
              'x-component-props': {
                label: '退款状态',
                nameKey: 'refundStatusName',
              },
              'x-designable-id': 'vgx3a7ic6cx',
              'x-index': 0,
            },
            s44zq4jdw7f: {
              type: 'void',
              'x-component': 'Descriptions.Item',
              'x-component-props': {
                label: '创建时间',
                span: 1,
                children: '',
                nameKey: 'createTime',
              },
              'x-designable-id': 's44zq4jdw7f',
              'x-index': 1,
            },
            iy3vb2lk7el: {
              type: 'void',
              'x-component': 'Descriptions.Item',
              'x-component-props': {
                label: 'Item 3',
                children: '123',
                nameKey: 'a',
                visibleExpression:
                  "{{(ctx) => {\r\n  console.log(ctx)\r\n  return ctx.globalOrderType !== 'IL'\r\n}}}",
              },
              'x-designable-id': 'iy3vb2lk7el',
              'x-index': 2,
              'x-reactions': {
                dependencies: [
                  {
                    property: 'value',
                    type: 'any',
                  },
                ],
                fulfill: {
                  run: '$effect(()=>{\r\n},[])',
                },
              },
            },
            '1vz5hov03bf': {
              type: 'void',
              'x-component': 'Descriptions.Item',
              'x-component-props': {
                label: 'Item 4',
                children: '444',
              },
              'x-designable-id': '1vz5hov03bf',
              'x-index': 3,
            },
          },
        },
      },
      'x-designable-id': 'qg4jnu6uynb',
    },
  },
}

// 演示用的Schema数据 - 基于真实业务场景的Formily Schema
export const demoSchemas: Record<string, PageSchema> = fileUrlSchemas
